/*
 * Created by Dev c++ 5.11
 * Author: liyih
 * Date: 2018/03/16
 */

#include <iostream>
#include <stack>
using namespace std;
int main()
{
	int i = 0;
	stack<char>p;
	string s;
	cin>>s;
	while(s[i] != '@'){
		p.push(s[i]);
		i++;
	}
	i++;
	while(s[i] != '#'){
		if(p.top() == s[i])p.pop();
		else{
			cout<<"no!";
			return 0;
		}
		i++;
		if(p.empty()&&s[i]!='#')break;
	}
	if(p.empty() && i==s.length()-1){
		cout<<"yes!";
	}
	else cout<<"no!";
	return 0;
}
